{$contents}

{literal}
<div style="text-align:left; padding:10px;">
<h2>Source</h2>

<pre class="code">
&lt;?php
$post = DomFgPost::getInstance();
if( $post->login ) {
	
	// load user by using $post->username and $post->password
	
	$error = array(
		'type' => 'error',
		'message' => 'Teid ei õnnestunud sisse logida',
		'colspan' => 2,
	);
}		
		
$panel = array(
	'title' => 'Login to enter',
	'layout' => 'table',
	'style' => 'width:400px',
	'action' => $this->getUrl('loginForm1'),
	'items' => array(
		$error,
		array(
			'type' => 'textField',
			'title' => 'Kasutajanimi',
			'name' => 'username',
			'value' => $post->username,
		),
		array(
			'type' => 'password',
			'title' => 'Parool',
			'name' => 'password',				
		),
	),	
	'buttons' => array(
		array(
			'title' => 'Logi sisse',
			'name' => 'login',
		),
	),
);
		
$this->view->contents = DomFg::render( $panel );
?&gt;
</pre>
</div>
{/literal}